<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>hexo+Butterfly+aplayer并设置网易云音乐歌单 | forever</title><meta name="keywords" content="Butterfly"><meta name="author" content="forever"><meta name="copyright" content="forever"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="操作前一定做好配置文件的备份  操作前一定做好配置文件的备份 操作前一定做好配置文件的备份在查看文档前请确认你已经安装好hexo+Butterfly 没有安装的请点击这里  一切准备就绪后开始安装aplayer(全局吸底) 安装插件 github地址 npm install --save hexo-tag-aplayer 修改Hexo配置文件(如果没有 直接加入到文件末尾) aplayer:">
<meta property="og:type" content="article">
<meta property="og:title" content="hexo+Butterfly+aplayer并设置网易云音乐歌单">
<meta property="og:url" content="https://foreverone.gitee.io/post/hexo-Butterfly-aplayer.html">
<meta property="og:site_name" content="forever">
<meta property="og:description" content="操作前一定做好配置文件的备份  操作前一定做好配置文件的备份 操作前一定做好配置文件的备份在查看文档前请确认你已经安装好hexo+Butterfly 没有安装的请点击这里  一切准备就绪后开始安装aplayer(全局吸底) 安装插件 github地址 npm install --save hexo-tag-aplayer 修改Hexo配置文件(如果没有 直接加入到文件末尾) aplayer:">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://foreverone.gitee.io/img/2.jpg">
<meta property="article:published_time" content="2021-04-20T14:24:34.000Z">
<meta property="article:modified_time" content="2021-04-21T07:56:22.000Z">
<meta property="article:author" content="forever">
<meta property="article:tag" content="Butterfly">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://foreverone.gitee.io/img/2.jpg"><link rel="shortcut icon" href="/img/xx.jpg"><link rel="canonical" href="https://foreverone.gitee.io/post/hexo-Butterfly-aplayer"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta name="baidu-site-verification" content="code-39EbL9VNav"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?04cbb33e2ee2c7310888c7b04bd680be";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"prismjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"bottom-left"},
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-04-21 07:56:22'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    })(window)</script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/static-butterfly/dist/css/index.min.css"><meta name="generator" content="Hexo 5.4.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src="/img/header.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">4</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">2</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">2</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('/img/2.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">forever</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">hexo+Butterfly+aplayer并设置网易云音乐歌单</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-04-20T14:24:34.000Z" title="发表于 2021-04-20 14:24:34">2021-04-20</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-04-21T07:56:22.000Z" title="更新于 2021-04-21 07:56:22">2021-04-21</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/Butterfly/">Butterfly</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="hexo+Butterfly+aplayer并设置网易云音乐歌单"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><hr>
<h1 id="操作前一定做好配置文件的备份-操作前一定做好配置文件的备份-操作前一定做好配置文件的备份"><a href="#操作前一定做好配置文件的备份-操作前一定做好配置文件的备份-操作前一定做好配置文件的备份" class="headerlink" title="操作前一定做好配置文件的备份  操作前一定做好配置文件的备份 操作前一定做好配置文件的备份"></a><code>操作前一定做好配置文件的备份</code>  <code>操作前一定做好配置文件的备份</code> <code>操作前一定做好配置文件的备份</code></h1><h3 id="在查看文档前请确认你已经安装好hexo-Butterfly"><a href="#在查看文档前请确认你已经安装好hexo-Butterfly" class="headerlink" title="在查看文档前请确认你已经安装好hexo+Butterfly"></a>在查看文档前请确认你已经安装好hexo+Butterfly</h3><ul>
<li><a href="/post/%E5%AE%89%E8%A3%85Butterfly.html">没有安装的请点击这里</a></li>
</ul>
<h3 id="一切准备就绪后开始安装aplayer-全局吸底"><a href="#一切准备就绪后开始安装aplayer-全局吸底" class="headerlink" title="一切准备就绪后开始安装aplayer(全局吸底)"></a>一切准备就绪后开始安装aplayer(全局吸底)</h3><ul>
<li><p>安装插件 <a target="_blank" rel="noopener" href="https://github.com/MoePlayer/hexo-tag-aplayer">github地址</a></p>
<pre class="line-numbers language-NPM" data-language="NPM"><code class="language-NPM">npm install --save hexo-tag-aplayer<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre></li>
<li><p>修改<code>Hexo配置文件</code>(如果没有 直接加入到文件末尾)</p>
<pre class="line-numbers language-YAML" data-language="YAML"><code class="language-YAML">aplayer:
  meting: true
  asset_inject: false<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre></li>
<li><p>配置<code>主题文件</code>(主题中的配置文件)</p>
<pre class="line-numbers language-YAML" data-language="YAML"><code class="language-YAML">aplayerInject:
  enable: true
  per_page: true<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre></li>
<li><p>把<code>aplayer</code> 代码插入到主题配置文件中</p>
<pre class="line-numbers language-YAML" data-language="YAML"><code class="language-YAML">inject:
  head:
  bottom:
    - &lt;div class&#x3D;&quot;aplayer no-destroy&quot; data-id&#x3D;&quot;000PeZCQ1i4XVs&quot; data-server&#x3D;&quot;tencent&quot; data-type&#x3D;&quot;artist&quot; data-fixed&#x3D;&quot;true&quot; data-mini&#x3D;&quot;true&quot; data-listFolded&#x3D;&quot;false&quot; data-order&#x3D;&quot;random&quot; data-preload&#x3D;&quot;none&quot; data-autoplay&#x3D;&quot;true&quot; muted&gt;&lt;&#x2F;div&gt;<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>
<blockquote>
<p>ok 重新部署hexo 并启动 查看 是否左下角已经有了音乐控件呢? 如果没有并且是按照步骤来的<a target="_blank" rel="noopener" href="https://butterfly.js.org/posts/507c070f/#%E6%8F%92%E5%85%A5Aplayer-html">请查看官网</a></p>
</blockquote>
</li>
</ul>
<h3 id="网易云歌单设置"><a href="#网易云歌单设置" class="headerlink" title="网易云歌单设置"></a>网易云歌单设置</h3><blockquote>
<p>上一个步骤 中的</p>
</blockquote>
<pre class="line-numbers language-none"><code class="language-none">- &lt;div class&#x3D;&quot;aplayer no-destroy&quot; data-id&#x3D;&quot;000PeZCQ1i4XVs&quot; data-server&#x3D;&quot;tencent&quot; data-type&#x3D;&quot;artist&quot; data-fixed&#x3D;&quot;true&quot; data-mini&#x3D;&quot;true&quot; data-listFolded&#x3D;&quot;false&quot; data-order&#x3D;&quot;random&quot; data-preload&#x3D;&quot;none&quot; data-autoplay&#x3D;&quot;true&quot; muted&gt;&lt;&#x2F;div&gt;<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<blockquote>
<p>其中我们主要修改的几个地方</p>
</blockquote>
<table>
<thead>
<tr>
<th>选项</th>
<th>默认值</th>
<th>描述</th>
</tr>
</thead>
<tbody><tr>
<td>id</td>
<td>必须值</td>
<td>歌曲 id / 播放列表 id / 相册 id / 搜索关键字</td>
</tr>
<tr>
<td>server</td>
<td>必须值</td>
<td>音乐平台: netease, tencent, kugou, xiami, baidu</td>
</tr>
<tr>
<td>type</td>
<td>必须值</td>
<td>song, playlist, album, search, artist</td>
</tr>
</tbody></table>
<blockquote>
<p>更多参数<br><img src="https://inews.gtimg.com/newsapp_ls/0/13437540465/0.jpg" alt="更多参数"></p>
</blockquote>
<ul>
<li><p>首先进入<a target="_blank" rel="noopener" href="https://music.163.com/">网易云音乐</a>以我的歌单为例<br><img src="https://inews.gtimg.com/newsapp_ls/0/13437500162/0.jpg" alt="网易云音乐"></p>
</li>
<li><p>然后 按f12 选择元素 并找到 data-matcher 中的 数值(typ=playlist id=数字) 这就是我们的id<br><img src="https://inews.gtimg.com/newsapp_ls/0/13437516855/0.jpg" alt="选择元素"></p>
</li>
<li><p>然后我们把数据组装好再替换到<code>主题文件</code> 中 就ok 了 重新部署一下hexo 一切就over  拜拜ヾ(•ω•`)o!</p>
<pre class="line-numbers language-none"><code class="language-none">- &lt;div class&#x3D;&quot;aplayer no-destroy&quot; data-id&#x3D;&quot;你捕捉到的id&quot; data-server&#x3D;&quot;netease&quot; data-type&#x3D;&quot;playlist&quot; data-fixed&#x3D;&quot;true&quot; data-mini&#x3D;&quot;true&quot; data-listFolded&#x3D;&quot;false&quot; data-order&#x3D;&quot;random&quot; data-preload&#x3D;&quot;none&quot; data-autoplay&#x3D;&quot;true&quot; muted&gt;&lt;&#x2F;div&gt;<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p><img src="https://inews.gtimg.com/newsapp_ls/0/13437333980/0.jpg" alt="音乐播放"></p>
</li>
</ul>
</article><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/Butterfly/">Butterfly</a></div><div class="post_share"><div class="social-share" data-image="/img/2.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="next-post pull-full"><a href="/post/%E5%B8%B8%E7%94%A8%E6%A0%BC%E5%BC%8F.html"><img class="next-cover" src="/img/1.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">常用格式</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span> 相关推荐</span></div><div class="relatedPosts-list"><div><a href="/post/安装Butterfly.html" title="hexo+安装Butterfly"><img class="cover" src="/img/2.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-04-19</div><div class="title">hexo+安装Butterfly</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="gitalk-container"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src="/img/header.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">forever</div><div class="author-info__description"></div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">4</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">2</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">2</div></a></div></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">forever young</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%93%8D%E4%BD%9C%E5%89%8D%E4%B8%80%E5%AE%9A%E5%81%9A%E5%A5%BD%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%9A%84%E5%A4%87%E4%BB%BD-%E6%93%8D%E4%BD%9C%E5%89%8D%E4%B8%80%E5%AE%9A%E5%81%9A%E5%A5%BD%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%9A%84%E5%A4%87%E4%BB%BD-%E6%93%8D%E4%BD%9C%E5%89%8D%E4%B8%80%E5%AE%9A%E5%81%9A%E5%A5%BD%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%9A%84%E5%A4%87%E4%BB%BD"><span class="toc-number">1.</span> <span class="toc-text">操作前一定做好配置文件的备份  操作前一定做好配置文件的备份 操作前一定做好配置文件的备份</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%9C%A8%E6%9F%A5%E7%9C%8B%E6%96%87%E6%A1%A3%E5%89%8D%E8%AF%B7%E7%A1%AE%E8%AE%A4%E4%BD%A0%E5%B7%B2%E7%BB%8F%E5%AE%89%E8%A3%85%E5%A5%BDhexo-Butterfly"><span class="toc-number">1.0.1.</span> <span class="toc-text">在查看文档前请确认你已经安装好hexo+Butterfly</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%80%E5%88%87%E5%87%86%E5%A4%87%E5%B0%B1%E7%BB%AA%E5%90%8E%E5%BC%80%E5%A7%8B%E5%AE%89%E8%A3%85aplayer-%E5%85%A8%E5%B1%80%E5%90%B8%E5%BA%95"><span class="toc-number">1.0.2.</span> <span class="toc-text">一切准备就绪后开始安装aplayer(全局吸底)</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BD%91%E6%98%93%E4%BA%91%E6%AD%8C%E5%8D%95%E8%AE%BE%E7%BD%AE"><span class="toc-number">1.0.3.</span> <span class="toc-text">网易云歌单设置</span></a></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/post/hexo-Butterfly-aplayer.html" title="hexo+Butterfly+aplayer并设置网易云音乐歌单"><img src="/img/2.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="hexo+Butterfly+aplayer并设置网易云音乐歌单"/></a><div class="content"><a class="title" href="/post/hexo-Butterfly-aplayer.html" title="hexo+Butterfly+aplayer并设置网易云音乐歌单">hexo+Butterfly+aplayer并设置网易云音乐歌单</a><time datetime="2021-04-20T14:24:34.000Z" title="发表于 2021-04-20 14:24:34">2021-04-20</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/post/%E5%B8%B8%E7%94%A8%E6%A0%BC%E5%BC%8F.html" title="常用格式"><img src="/img/1.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="常用格式"/></a><div class="content"><a class="title" href="/post/%E5%B8%B8%E7%94%A8%E6%A0%BC%E5%BC%8F.html" title="常用格式">常用格式</a><time datetime="2021-04-20T00:49:25.000Z" title="发表于 2021-04-20 00:49:25">2021-04-20</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/post/%E5%AE%89%E8%A3%85Butterfly.html" title="hexo+安装Butterfly"><img src="/img/2.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="hexo+安装Butterfly"/></a><div class="content"><a class="title" href="/post/%E5%AE%89%E8%A3%85Butterfly.html" title="hexo+安装Butterfly">hexo+安装Butterfly</a><time datetime="2021-04-19T21:07:37.000Z" title="发表于 2021-04-19 21:07:37">2021-04-19</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/post/hello-world.html" title="Hello World"><img src="/img/1.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hello World"/></a><div class="content"><a class="title" href="/post/hello-world.html" title="Hello World">Hello World</a><time datetime="2021-04-19T09:20:20.261Z" title="发表于 2021-04-19 09:20:20">2021-04-19</time></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('/img/2.jpg')"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2021 By forever</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>function addGitalkSource () {
  const ele = document.createElement('link')
  ele.rel = 'stylesheet'
  ele.href= 'https://cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.css'
  document.getElementsByTagName('head')[0].appendChild(ele)
}

function loadGitalk () {
  function initGitalk () {
    var gitalk = new Gitalk(Object.assign({
      clientID: '80a033ab166e2a2ffac9',
      clientSecret: 'b92169898120afff5ce832ecb11b60735389cc0d',
      repo: 'YGForever',
      owner: 'YGForever',
      admin: ['YGForever'],
      id: '852830e090791912b9c15578011173a3',
      language: 'zh-CN',
      perPage: 10,
      distractionFreeMode: false,
      pagerDirection: 'last',
      createIssueManually: false,
      updateCountCallback: commentCount
    },null))

    gitalk.render('gitalk-container')
  }

  if (typeof Gitalk === 'function') initGitalk()
  else {
    addGitalkSource()
    getScript('https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js').then(initGitalk)
  }
}

function commentCount(n){
  let isCommentCount = document.querySelector('#post-meta .gitalk-comment-count')
  if (isCommentCount) {
    isCommentCount.innerHTML= n
  }
}

if ('Gitalk' === 'Gitalk' || !true) {
  if (true) btf.loadComment(document.getElementById('gitalk-container'), loadGitalk)
  else loadGitalk()
} else {
  function loadOtherComment () {
    loadGitalk()
  }
}</script></div><div class="aplayer no-destroy" data-id="3778678" data-server="netease" data-type="playlist" data-fixed="true" data-mini="true" data-listFolded="false" data-order="list" data-preload="none" data-autoplay="false" muted></div><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/gh/metowolf/MetingJS@1.2/dist/Meting.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = [
  'title',
  '#config-diff',
  '#body-wrap',
  '#rightside-config-hide',
  '#rightside-config-show',
  '.js-pjax'
]

if (false) {
  pjaxSelectors.unshift('meta[property="og:image"]', 'meta[property="og:title"]', 'meta[property="og:url"]')
}

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // Analytics
  if (false) {
    MtaH5.pgv()
  }

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})


document.addEventListener('pjax:send', function () {
  typeof preloader === 'object' && preloader.initLoading()
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>